<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="renderer" content="webkit">
	    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<title>客户列表</title>
		<link rel="stylesheet" href="/Public/frame/layui/css/layui.css">
			<!--<link rel="stylesheet" href="http://cdn.datatables.net/1.10.13/css/jquery.dataTables.min.css">-->
		<link rel="stylesheet" href="/Public/frame/static/css/style.css">
	</head>
	<body>
        <div class="layui-collapse" lay-accordion="">
            <div class="layui-colla-item">
                <h2 class="layui-colla-title">该单销售专员分成情况</h2>
                <div class="layui-colla-content layui-show">
                    <table class="layui-table" border="" cellspacing="" cellpadding="" width="100%">
                        <thead>
                            <tr>
                                <td width="10%">客户名字</td>
                                <td width="10%">资金类别</td>  
                                <td width="10%">资金总额</td>
                                <td width="10%">销售专员</td>
                                <td width="10%">分成比例</td>
                                <td width="10%">分成金额</td>
                                <td width="10%">下单时间</td>               
                            </tr>
                        </thead>
                        <tbody>
                            <?php foreach ($data['divide_worker_list'] as $k => $v):?>
                                <tr>
                                    <td><?php echo $v['cus_name'];?></td>
                                    <td><?php echo $v['typeid'];?></td>
                                    <td><?php echo $v['opfare'];?></td>
                                    <td><?php echo $v['sale_worker_name'];?></td>
                                    <td><?php echo $v['percent'];?></td>
                                    <td><?php echo $v['opfare']*$v['percent'];?></td>
                                    <td><?php echo $v['operate_time'];?></td>                               
                                </tr>
                            <?php endforeach;?> 
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="layui-colla-item">
                <h2 class="layui-colla-title">该单销售主任分成情况</h2>
                <div class="layui-colla-content">
                    <table class="layui-table" border="" cellspacing="" cellpadding="" width="100%">
                        <thead>
                            <tr>
                                <td width="10%">客户名字</td>
                                <td width="10%">资金类别</td>  
                                <td width="10%">资金总额</td>
                                <td width="10%">销售主任</td>
                                <td width="10%">分成比例</td>
                                <td width="10%">分成金额</td>
                                <td width="10%">下单时间</td>               
                            </tr>
                        </thead>
                        <tbody>
                            <?php foreach ($data['divide_head_list'] as $k => $v):?>
                                <tr>
                                    <td><?php echo $v['cus_name'];?></td>
                                    <td><?php echo $v['typeid'];?></td>
                                    <td><?php echo $v['opfare'];?></td>
                                    <td><?php echo $v['sale_worker_name'];?></td>
                                    <td><?php echo $v['percent'];?></td>
                                    <td><?php echo $v['opfare']*$v['percent'];?></td>
                                    <td><?php echo $v['operate_time'];?></td>                               
                                </tr>
                            <?php endforeach;?> 
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="layui-colla-item">
                <h2 class="layui-colla-title">该单销售经理分成情况</h2>
                <div class="layui-colla-content">
                    <table class="layui-table" border="" cellspacing="" cellpadding="" width="100%">
                        <thead>
                            <tr>
                                <td width="10%">客户名字</td>
                                <td width="10%">资金类别</td>  
                                <td width="10%">资金总额</td>
                                <td width="10%">销售主任</td>
                                <td width="10%">分成比例</td>
                                <td width="10%">分成金额</td>
                                <td width="10%">下单时间</td>               
                            </tr>
                        </thead>
                        <tbody>
                            <?php foreach ($data['divide_manager_list'] as $k => $v):?>
                                <tr>
                                    <td><?php echo $v['cus_name'];?></td>
                                    <td><?php echo $v['typeid'];?></td>
                                    <td><?php echo $v['opfare'];?></td>
                                    <td><?php echo $v['sale_worker_name'];?></td>
                                    <td><?php echo $v['percent'];?></td>
                                    <td><?php echo $v['opfare']*$v['percent'];?></td>
                                    <td><?php echo $v['operate_time'];?></td>                               
                                </tr>
                            <?php endforeach;?> 
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
	</body>
</html>
<script type="text/javascript" src="/Public/hawk/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="/Public/frame/layui/layui.js"></script>
    <script>
              // 刷新
        $('#btn-refresh').on('click', function () {
            location.reload();
        });
        layui.use(['layer','element','layedit', 'laydate'], function(){
          var layer = layui.layer,element = layui.element,layedit = layui.layedit,laydate = layui.laydate;             
        });
    
    </script>